<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

		<title>销售价格政策新增</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath()%>/css/public.css">
		<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/public.js"></script>
			<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/date1.js"></script>
			<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/validate.js"></script>
			<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/salesprice.js" charset="utf-8"></script>
		<script type="text/javascript">
		function validate()
		{	
			var code = document.getElementById("code");
			var name = document.getElementById("name");
			var prior = document.getElementById("prior");
			var from = document.getElementById("from");
			var to = document.getElementById("to");
			
			
			//验证凭证字名称代码
			if(!isNotNull(code,'价格政策编号')||!f_check_NumOrLett(code,'价格政策编号')||!f_check_NumLength(code,'价格政策编号')){
				return false ;	
				}
			if(!isNotNull(name,'价格政策名称')||!f_check_ZhOrNumOrLett(name,'价格政策名称')||!f_check_passwordLength(name,'价格政策名称',1,12)){
			return false ;	
			}
			if(!f_check_integer(prior,'价格政策优先级')||!f_check_passwordLength(prior,'价格政策优先级',1,3)){
			return false ;	
			}
			if(!isNotNull(from,'周期设置从')){
			return false;
			}
			if(!isNotNull(to,'周期设置到')){
			return false;
			}
			if(!interzone(from,to,'周期设置')){
			return false;
			}
			
		}
		</script>

	</head>

	<body>
		<div id="info_all" style="width: 385px;">
			<div id="info_top">
				销售价格政策新增
			</div>
			<div style="padding: 4px; width: 380px; margin-top: 6px;">
				<s:form action="editSalespricepolicy.action" name="delrow"
					theme="simple" onsubmit="return validate()"
					cssStyle="margin-top:0px;">
					<table
						style="margin-top: 10px; background: #fbfbfb; color: #403040;"
						align="center">
						<tr>
							<td width="70px">
								政策编号：
							</td>
							<td>
								<s:textfield name="salespricepolicyModel.salesPricePolicyCode"
									id="code" size="12"></s:textfield>
							</td>
						</tr>
						<tr>
							<td>
								政策名称：
								
							</td>
							<td>
								<s:textfield name="salespricepolicyModel.salesPricePolicyName"
									id="name" size="12"></s:textfield>
							</td>
						</tr>
						<tr>
							<td>
								优先级：
							</td>
							<td>
								<s:textfield name="salespricepolicyModel.prior" id="prior"
									size="12"></s:textfield>
							</td>
						</tr>
						<%--<tr>
							<td>
								组合类型：
							</td>
							<td>
							<s:select
							list="#{'客户+物料':'客户+物料','物料+客户':'物料+客户'}"
							name="salespricepolicyModel.compoundType" id="type"></s:select>
						</tr>
						--%><tr>
							<td>
								周期设置：
							</td>
							<td width="100px">
								<s:textfield name="salespricepolicyModel.validDateFrom"
									id="from" size="12" readonly='true' cssStyle='cursor: hand'
									onclick="calendar.setHook(this)"></s:textfield>
							</td>
							<td>
								&nbsp;到&nbsp;
							</td>
							<td width="100px">
								<s:textfield name="salespricepolicyModel.validDateTo" id="to"
									size="12" readonly='true' cssStyle='cursor: hand'
									onclick="calendar.setHook(this)"></s:textfield>
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<div style="margin: 6px; text-align: center;">
									<s:submit value="保存" onmouseover="this.className='btnover'"
										onfocus="this.blur()" onmouseout="this.className='btnout'"
										id="btnsize"></s:submit>

								</div>
							</td>
							<td colspan="2">
								<div style="margin: 6px; text-align: left;">
									<input type="button" value="返回" onclick="window.history.go(-1)"
										onfocus="this.blur()" onmouseout="this.className='btnout'"
										id="btnsize">
								</div>
							</td>
						</tr>
					</table>
				</s:form>
			</div>
		</div>
		<script type="text/javascript">
	 		getTitle('code','凭销售价格政策');	
		</script>
	</body>
</html>
